package com.cnswhy.cloud.server.core.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.cnswhy.cloud.common.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.cnswhy.cloud.common.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 
 * </p>
 *
 * @author cnswhy
 * @since 2020-10-17
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_charge_money")
@ApiModel(value = "ChargeMoney", description = "")
@AllArgsConstructor
public class ChargeMoney extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "")
    @NotNull(message = "不能为空")
    @TableField("customer_id")
    @Excel(name = "")
    private Long customerId;

    @ApiModelProperty(value = "")
    @TableField("charge_money")
    @Excel(name = "")
    private Long chargeMoney;

    /**
     * 1支付宝2微信
     */
    @ApiModelProperty(value = "1支付宝2微信")
    @TableField("pay_type")
    @Excel(name = "1支付宝2微信")
    private Integer payType;

    @ApiModelProperty(value = "")
    @Length(max = 50, message = "长度不能超过50")
    @TableField(value = "order_num", condition = LIKE)
    @Excel(name = "")
    private String orderNum;

    /**
     * 1待支付2已支付3取消
     */
    @ApiModelProperty(value = "1待支付2已支付3取消")
    @TableField("status")
    @Excel(name = "1待支付2已支付3取消")
    private Integer status;

    /**
     * 交易id
     */
    @ApiModelProperty(value = "交易id")
    @Length(max = 100, message = "交易id长度不能超过100")
    @TableField(value = "transaction_id", condition = LIKE)
    @Excel(name = "交易id")
    private String transactionId;


    @Builder
    public ChargeMoney(Long id, LocalDateTime createTime, LocalDateTime updateTime, Long createUser, Long updateUser, 
                    Long customerId, Long chargeMoney, Integer payType, String orderNum, Integer status, String transactionId) {
        this.id = id;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.createUser = createUser;
        this.updateUser = updateUser;
        this.customerId = customerId;
        this.chargeMoney = chargeMoney;
        this.payType = payType;
        this.orderNum = orderNum;
        this.status = status;
        this.transactionId = transactionId;
    }

}
